#include <stdio.h>
int main() {
    int T;
    scanf("%d", &T);
    while (T--) {
        int n, i, j;
        scanf("%d%d%d", &n, &i, &j);
        int arr[n];
        for (int k = 0; k < n; k++) {
            scanf("%d", &arr[k]);
        }
        for (int k = i - 1; k < j - 1; k++) {
            int temp = arr[k];
            arr[k] = arr[j - 1 - (k - i + 1)];
            arr[j - 1 - (k - i + 1)] = temp;
        }
        for (int k = 0; k < n; k++) {
            printf("%d ", arr[k]);
        }
        printf("");
    }
    return 0;
}
